<?php 

include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/session_control_empleador.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/session_helper.php");


if ( !empty($_GET)){
	
	$msgError = null;
	$msgExito = null;
	$msgInfo = null;
}else{
	
}
?>




<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>- SITRABS - Agregar Nueva Oferta</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen"
	href="../css/bootstrap3-datetimepicker.css" />
 <link href="css/style.css" rel="stylesheet">

<script src="../js/bootstrap.min3.js"></script> 
<link href="../css/bootstrap.min3.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen"
	href="../css/bootstrap3-datetimepicker.css" />
 
      <script src="../js/jquery.min.js"></script> 

<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap3-datepicker.js"></script>

<script type="text/javascript">
$(document).ready(function()
{
$("#departamento").change(function()
{
var id=$(this).val();
var dataString = 'idDepartamento='+ id;

$.ajax
({
type: "POST",
url: "../util/ajax_municipio.php",
data: dataString,
cache: false,
success: function(html)
{
$("#municipio").html(html);
} 
});

});

});
</script>

</head>

<body>
	<div class="container">
		<nav class="navbar navbar-default navbar-static">
        <div class="navbar-header">
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#b-menu-2">
                <span class="sr-only">Navegación</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand">Agregar Oferta</a>
        </div>

        <!-- submenu elements for #b-menu-2 -->
        <div class="collapse navbar-collapse" id="b-menu-2">
          <ul class="nav navbar-nav">
 <li><a href="../home/home_empleador.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li> <a href="../help_usaempr.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
           <li><a href="../action/action_logout.php"><span  class="glyphicon glyphicon-remove"></span>Cerrar Sesion</a></li>
        
            <li class="dropdown">
             <ul class="dropdown-menu">
 
 <li><a href="../home/home_empleador.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li> <a href="../help_usaempr.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
           <li><a href="../action/action_logout.php"><span  class="glyphicon glyphicon-remove"></span>Cerrar Sesion</a></li>
        
          </ul> 
        </div><!-- /.nav-collapse -->
      </nav>
	</div>

	<div class="container">

		<div class="span10 offset1">

			<div class="row">
			<div class="bs-example">
			
				<div class="progress progress-striped active">
				  <div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 34%;">
				     Paso 1/3
				  </div>
				</div>	
				</div>			
			</div>
			

			<div class="row">
				<?php 

					
				if($msgExito != null){
						echo "<div class='alert alert-success'> " . $msgExito ." </div>";
					}

					if($msgInfo != null){
						echo "<div class='alert alert alert-info'> " .$msgInfo ." </div>";
					}

					if($msgError != null){
						echo "<div class='alert alert-danger'> " . $msgError ." </div>";
					}







					?>

			</div>

			<form class="form-horizontal"
				action="../action/action_register_basic_oferta.php" method="post">

				<div class='row'>
					<div class="col-md-6">
					 <input name="idEmpleador" type="hidden"
					value="<?php echo !empty($id)?$id:'';?>" />
						<label class="control-label">Area Empresa</label> <select
							name="areaEmpresa" class="form-control" data-toggle="tooltip"
							data-placement="top" title="Filtra por Area">
							<?php 
							include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
							$esBusqueda = false;
							Combos::drawComboAreaEmpresa($esBusqueda);
							?>
						</select>
					</div>

					<div class="col-md-6">
						<label class="control-label">Cargo Solicitado</label> <select
							name="cargoSolicitado" class="form-control" data-toggle="tooltip"
							data-placement="top" title="Filtra por CargoSolicitado">
							<?php 
							include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
							$esBusqueda = false;
							Combos::drawComboCargo($esBusqueda);
							?>
						</select>
					</div>
				</div>


				<div class='row'>
					<div class="col-md-6">
						<label class="control-label">Tipo de Contratacion</label> <select
							name="tipoContratacion" class="form-control"
							data-toggle="tooltip" data-placement="top"
							title="Selecciona Tipo de Contratacion">
							<option value="Tiempo Completo">Tiempo Completo</option>
							<option value="Tiempo Parcial">Tiempo Parcial</option>
							<option value="Por Proyecto">Por Proyecto</option>
						</select>
					</div>

					<div class="col-md-6">
						<label class="control-label">Experiencia Requerida</label> <select
							name="experienciaRequerida" class="form-control"
							data-toggle="tooltip" data-placement="top"
							title="Selecciona Experiencia Requerida">
							<option value="Si">Si</option>
							<option value="No">No</option>
							<option value="Deseable">Deseable</option>
						</select>
					</div>
				</div>



				<div class="row">
					<div class="col-md-6">
						<label class="control-label">Nivel Academico</label> <select
							name="nivelAcademico" class="form-control">
							<?php 
							include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
							Combos::drawComboNivelAcademico();
							?>
						</select>
					</div>
					<div class="col-md-6">
						<label class="control-label">Cantidad De Plazas</label> <input
							name="cantidadPlazas" type="text"
							placeholder="Cantidad de Plazas" class="form-control">
					</div>
				</div>

				<div class="row">
					<div class="col-md-6">
						<label class="control-label">Departamento</label> <select  required
							name="departamento" class="form-control" id="departamento"
							data-toggle="tooltip" data-placement="top"
							title="Selecciona Departamento">
							<option selected="selected"></option>
							<?php include($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/option_departamento.php");?>
						</select>
					</div>
					<div class="col-md-6">
						<label class="control-label">Municipio</label> <select  required
							name="municipio" class="form-control" id="municipio"
							data-toggle="tooltip" data-placement="top"
							title="Selecciona Municipio">
							<option selected="selected"></option>
						</select>
					</div>
				</div>




				<div class="row">

					<div class="col-md-6">
						<label class="control-label">Inicio Vigencia</label>
						<div class="input-group date">
							<input type="text" class="form-control" name="inicioVigencia" required><span
								class="input-group-addon"><i class="glyphicon glyphicon-th"></i>
							</span>
						</div>

					</div>
					<div class="col-md-6">
						<label class="control-label">Fin Vigencia</label>
						<div class="input-group date">
							<input type="date" class="form-control" name="finVigencia" required><span
								class="input-group-addon"><i class="glyphicon glyphicon-th"></i>
							</span>
						</div>

					</div>

					<script>

					
				    $('.input-group.date').datepicker({
				        format: "yyyy-mm-dd",				   
				        startDate: "1921-01-01",
				        endDate: "2081-01-01",
				       // todayBtn: "linked",				      
				        autoclose: true,
				        });
				</script>


				</div>

				<div class="row">
					<div class="col-md-6">
						<label class="control-label">Descripcion Oferta</label>
						<textarea name='descripcionOferta' class="form-control" rows="4"
							placeholder="Descripcion Oferta" required></textarea>

					</div>
					<div class="col-md-6">
						<label class="control-label">Rango Salarial</label> <select
							name="rangoSalarial" class="form-control" data-toggle="tooltip"
							data-placement="top" title="Filtra por Rango Salarial">
							<?php 
							include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
							$esBusqueda = false;
							Combos::drawComboRangoSalarial($esBusqueda);
							?>
						</select>
					</div>

				</div>


				<br />
				<div class="form-group">
				<center>
					<div>

						<a class="btn btn-default navbar-btn" href="../home/home_empleador.php">Regresar
							a Inicio</a>
						<button type="submit" class="btn btn-primary navbar-btn">Registrar</button>
					</div>
</center>
				</div>
			</form>
		</div>

	</div>	</div> 	</div>  <script type="text/javascript" src="js/bootstrap.min.js"></script> 


 <script type="text/javascript" src="../js/bootstrap.min.js"></script> 
</body>
</html>
